<html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>二维码</title>
    <script src="http://cdn.bootcss.com/jquery/3.0.0-beta1/jquery.js"></script>
    <style type="text/css">
        #box {
            margin: 10% 0 0 0;
width: 100%;
        }

        #content {
            white-space: nowrap;
            display:inline-block;
        }
    </style>
</head>

<body>
        <div id="box">
            <div style="transform: scale(0.949134); width: 20%; margin-left:10%; text-align: center; overflow: hidden; text-overflow: ellipsis;" id="content">该二维码永久有效，

请保存至您的手机</div>
        </div>
    <script type="text/javascript">
        $(function () {
            var $content = $('#content');
            // 通过 zoom 来调节文字大小
            var zoom =  $content.width()/300;
            $content.css('zoom', zoom);
            $content.css('-moz-transform', 'scale(' + zoom + ')');
            $content.css('-moz-transform-origin:', "top left");
        })
    </script>
</body></html>